home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Apple Reference & Presen…tion Library 4 (Reseller)
/
Apple Ref. & Pres. Lib.v4.0.iso
/
1-Reference
/
Success Stories
/
Lead Information
/
Lead Information
/
stack.txt
< prev
Wrap
Text File
|
1990-04-18
|
11KB
|
366 lines
-- stack: in
-- format: 8 (HyperCard 1)
-- flags: 0x1000 (none)
-- protect password hash: 0
-- maximum user level: 5 (scripting)
-- window: Rect(x1=0, y1=0, x2=0, y2=0)
-- screen: Rect(x1=0, y1=0, x2=0, y2=0)
-- card dimensions: w=512 h=342
-- scroll: x=0 y=0
-- background count: 4
-- first background id: 3704
-- card count: 7
-- first card id: 3243
-- list block id: 2149
-- print block id: 0
-- font table block id: 0
-- style table block id: 0
-- free block count: 2
-- free size: 1920 bytes
-- total size: 212992 bytes
-- stack block size: 9728 bytes
-- created by hypercard version: 0x02002001
-- compacted by hypercard version: 0x01228000
-- modified by hypercard version: 0x01228000
-- opened by hypercard version: 0x01228000
-- patterns[0]: 0x0000000000000000
-- patterns[1]: 0x8000000008000000
-- patterns[2]: 0x8800220088002200
-- patterns[3]: 0x8888222288882222
-- patterns[4]: 0x88AA22AA88AA22AA
-- patterns[5]: 0xCCAA33AACCAA33AA
-- patterns[6]: 0xEEAABBAAEEAABBAA
-- patterns[7]: 0xEEBBBBEEEEBBBBEE
-- patterns[8]: 0xFFBBFFEEFFBBFFEE
-- patterns[9]: 0xFFBBFFFFFFBBFFFF
-- patterns[10]: 0x8010022001084004
-- patterns[11]: 0xFFFFFFFFFFFFFFFF
-- patterns[12]: 0x8822882288228822
-- patterns[13]: 0x1122448811224488
-- patterns[14]: 0xC4800C6843023026
-- patterns[15]: 0xB130031BD8C00C8D
-- patterns[16]: 0xAA00AA00AA00AA00
-- patterns[17]: 0x8822552288225522
-- patterns[18]: 0x8855225588552255
-- patterns[19]: 0x77DD77DD77DD77DD
-- patterns[20]: 0x8000000000000000
-- patterns[21]: 0xAA55AA55AA55AA55
-- patterns[22]: 0xAA00AA00AA00AA00
-- patterns[23]: 0x8800000088000000
-- patterns[24]: 0x8814224188412214
-- patterns[25]: 0x8080413E080814E3
-- patterns[26]: 0x22048C7422179810
-- patterns[27]: 0xBE808808EB088880
-- patterns[28]: 0x25C8328964244C92
-- patterns[29]: 0xA29C41BE2AC914EB
-- patterns[30]: 0x40A00000040A0000
-- patterns[31]: 0x8040200002040800
-- patterns[32]: 0xAA00800088008000
-- patterns[33]: 0xFF80808080808080
-- patterns[34]: 0x081C22C180010204
-- patterns[35]: 0xFF808080FF080808
-- patterns[36]: 0xF87422478F172271
-- patterns[37]: 0xBF00BFBFB0B0B0B0
-- patterns[38]: 0xFF7FBE5DA2418000
-- patterns[39]: 0xFAF5FAF5A050A050
-- checksum: 0x0
----- HyperTalk script -----
------------------------------------------------------------------------
-- Stack: Lead Information --
-- © 1989 Apple Computer, Inc. & --
-- ©1990 Medior Productions --
-- ©1989 HyperPro --
-- --
-- 3/8/90 4:01 PM --
-- Version: 1.1 --
-- Based on version 1.0f5 by HyperPro --
------------------------------------------------------------------------
-- XCMDs to follow:
-- # 22291 NewItem
-- # 22290 NewWindow
-- # 22294 SetWindow
-- XFCNs to follow:
-- # 22292 Display
------------------------------------------------------------------------
on openStack
global gOrg,gConfig,gApp,gBack,gMark
if cantModify of this stack is true then
answer "Please unlock this file and the disk." with "Quit"
doMenu "Quit HyperCard"
exit openStack
end if
put false into gorg
put false into gconfig
put false into gMark
put false into gApp
put false into gBack
get offset("1",cd fld "status" of cd "intro")
if it ≠ 0 then
answer "Clear the previously entered lead?" with "Clear lead" or "Don’t clear"
if it is "Clear lead" then reset
end if
choose browse tool --just to make sure
pass openStack
end openStack
-------------------------------- openCard ------------------------------
on openCard
hide menubar
pass openCard
end openCard
--------------------------------- DoDone -------------------------------
on DoDone
global gOrg,gMark,gBack,gApp,gconfig,myfilename
set cursor to watch
if the heapspace <= 200000 then
get makedialog ("You do not have enough memory. "&& "Expect errors if you continue.", "Cancel","Quit")
if it is "quit" then doMenu "Quit HyperCard"
end if
lock screen
put the short name of this cd into lastcd
go cd "Org"
send closecard to cd "Org"
go cd "Mark"
send closecard to cd "Mark"
go cd "Config"
send closecard to cd "Config"
go cd "App"
send closecard to cd "App"
go cd "Back"
send closecard to cd "Back"
go cd lastcd
unlock screen
lock screen
--check if all sections are completed
if gOrg and gMark and gBack and gApp and gconfig then
get makedialog ("Are you sure you’re ready to create the file?" ,"No","Yes")
get last item of it
if it is "No" then
exit DoDone
end if
--create a text file containing the data
put value of word 2 of long name of this stack into myFileName
repeat until last char of myFileName is ":"
delete last char of myFileName
end repeat
put "Link to SS Program " after myFileName
put 2 into counter
repeat
open file myFileName
read from file myFileName for 16384
if it is empty then
close file myFileName
exit repeat
end if
close file myFileName
if last char of myFileName ≠ "m" then delete last char of myfilename
put myFileName & counter into myFileName
add 1 to counter
end repeat
open file myFileName
write projectData() to file myfilename
close file myFileName
get makedialog ("Please send the data file to Apple on Applelink." ,"OK")
get makedialog ("Enter another lead, return to Success Stories,"& " or Quit.","Quit","Return","Enter Lead")
get last item of it
if it is "Enter Lead" then
go first cd of this stack
unlock screen
unlock screen
wait 2 seconds
set cursor to watch
send openstack to stack
else if it is "Return" then
go cd "Introduction" of stack "Success Stories"
exit to HyperCard
else doMenu "Quit HyperCard"
--
else
answer "You did not complete all the sections." with "Quit Anyway" or "Show Me"
if it is "Quit Anyway" then
get makedialog ("Data incomplete. No data file will be created." & " Return to Success Stories or Quit.","Return","Quit","Cancel")
get last item of it
if it is "quit" then
doMenu "Quit HyperCard"
exit DoDone
else if it is "Return" then
go cd "Introduction" of stack "Success Stories"
exit to HyperCard
end if
else
if not gOrg then go cd "Org"
else if not gMark then go cd "Mark"
else if not gConfig then go cd "Config"
else if not gApp then go cd "App"
else if not gBack then go cd "Back"
end if
end if
end Dodone
------------------------------- projectData ----------------------------
function projectData
global gthefile,alldata,gtheorg,gthemark,gtheConfig,gtheApp,gtheback,myfilename
put empty into gthefile
put empty into alldata
set cursor to watch
lock screen
go cd "Org"
send BuildIt1 to this cd
put bg fld "input" of cd "org" after alldata
go cd "Mark"
send BuildIt2 to this cd
put bg fld "input" of cd "mark" after alldata
go cd "config"
send BuildIt3 to this cd
put bg fld "input" of cd "config" after alldata
go cd "App"
send BuildIt4 to this cd
put bg fld "input" of cd "app" after alldata
go cd "Back"
send BuildIt5 to this cd
put bg fld "input" of cd "back" after alldata
return allData
end projectData
---------------------------------- reset -------------------------------
on reset
global gOrg,gConfig,gApp,GBack,gMark
set cursor to watch
lock screen
go cd "org"
send resetCard to cd "org"
go cd "mark"
send resetCard to cd "mark"
go cd "config"
send resetCard to cd "config"
go cd "app"
send resetCard to cd "app"
go cd "back"
send resetCard to cd "back"
put false into gorg
put false into gconfig
put false into gMark
put false into gApp
put false into gConfig
go cd 1
put empty into cd fld "status"
unlock screen
end reset
-------------------------------- arrowKey ------------------------------
on arrowKey
if the selectedField is empty then exit arrowKey
else
set textArrows to true
pass arrowKey
end if
end arrowKey
--------------------------------- domenu -------------------------------
on domenu menu --// Added by Medior, Inc. 2/20/90
global RPStackName
if menu is in "Home,Quit HyperCard" and RPStackName is not empty then
set cursor to watch
put RPStackName into shortname
repeat until offset(":",shortname) = 0
delete char 1 to offset(":",shortname) of shortname
end repeat
delete last char of shortname
answer "This will return to "&shortname&"." with "Cancel" or "OK"
if it is "Cancel" then exit domenu
set cursor to watch
lock screen
go RPStackName
unlock screen with dissolve
exit domenu
else if menu is "Last" then exit doMenu
else pass doMenu
end domenu
------------------------------- closeField -----------------------------
on closeField
put word 1 to 9999 of target into it
repeat while first char of it is return
delete first char of it
end repeat
repeat while last char of it is return
delete last char of it
end repeat
put word 1 to 9999 of it into it
put it into target
if style of the target is "scrolling"
then set scroll of the target to 0
end closeField
------------------------------- makedialog -----------------------------
function makedialog strng,btnOne,btnTwo,btnThree
-- example get makedialog ("this is a test","Enter Lead","two","three")
global gAnswerDefined,sLine,selectionFlag
if btnThree is not empty then
put btnOne into xbtnThree
put btnTwo into xbtnTwo
put btnThree into xbtnOne
else
if btnTwo is not empty then
put btnOne into xbtnTwo
put btnTwo into xbtnOne
else
if btnOne is not empty then
put btnOne into xbtnOne
else put "Cancel" into xbtnOne
end if
end if
setWindow 5
NewWindow 328,90,"centered",0,1,"FakeAnswer","visible"
NewItem "StaticText",9,11,314,45,strng,"Chicago",12,"plain"
NewItem "RoundButton",223,55,314,83,xBtnOne,13,"noCommand",""
if btnTwo is not empty
then NewItem "RoundButton",112,59,203,79,xBtnTwo,0,"noCommand",""
if btnThree is not empty
then NewItem "RoundButton",6,59,97,79,xBtnThree,46,"Command",""
get Display(0,5)
if item 1 of it = "ok" then return last item of it
end MakeDialog